using System;
using System.Collections.Generic;
using System.Text;

namespace Colman.Rpg.Messaging
{
    /// <summary>
    /// Represents a response from the server to a <see cref="GetConnectedUsersRequest"/>.
    /// </summary>
    [Serializable]
    public class GetConnectedUsersResponse : ResponseMessage
    {
        /// <summary>
        /// Creates a new instance of <see cref="GetConnectedUsersResponse" />.
        /// </summary>
        /// <param name="users">The players currently connected.</param>
        public GetConnectedUsersResponse(List<Player> users)
            : base(users)
        {
            this.connectedUsers = users;
        }

        #region IEnumerable<Player>> ConnectedUsers { get; } (connectedUsers)
        private IEnumerable<Player> connectedUsers;

        /// <summary>
        /// Gets all of the currently connected users.
        /// </summary>
        [System.ComponentModel.Description("Indicates all of the currently connected users.")]
        public IEnumerable<Player> ConnectedUsers
        {
            [System.Diagnostics.DebuggerStepThrough]
            get
            {
                return this.connectedUsers;
            }
        }
        #endregion
    }
}
